<template>
  <div style="margin:200px">
    <el-button @click="open1">消息</el-button>
    <el-button @click="open2">成功</el-button>
    <el-button @click="open3">警告</el-button>
    <el-button @click="open4">错误</el-button>
  </div>
</template>

<script>
export default {
  methods: {
    open1() {
      this.$myMessage.info(this, "普通消息");
      // 测试axios封装，可删
      this.$http.get(this.$api.testUrl.url).then((res) => {
        console.log(res);
      });
    },
    open2() {
      this.$myMessage.success(this, "成功消息");
    },

    open3() {
      this.$myMessage.warning(this, "警告消息");
    },

    open4() {
      this.$myMessage.error(this, "失败消息");
    },
  },
};
</script>

<style></style>
